<?php

class team {

	private $teamID;
	private $name;
	private $league;
	private $update;
	private $away_coolness;
	private $away_flags;
	private $away_country;
	private $home_coolness;
	private $home_flags;
	private $home_country;
	private $and_coolness;
	private $and_flags;
	private $and_country;
	private $or_coolness;
	private $or_flags;
	private $or_country;
	private $plus_coolness;
	private $plus_flags;
	private $plus_country;
	private $userID;
	private $username;
	private $activationDate;
	private $flags = array();
	private $alliances = array();
	
	public function __construct($teamID = null, $name = null, $league = null, $update = null, $away_coolness = null, $away_flags = null, $away_country = null, $home_coolness = null, $home_flags = null, $home_country = null, $and_coolness = null, $and_flags = null, $and_country = null, $or_coolness = null, $or_flags = null, $or_country = null, $plus_coolness = null, $plus_flags = null, $plus_country = null, $userID = null, $username = null, $activationDate = null, $flags = null, $alliances = null) {
		$this->setTeamID($teamID);
		$this->setName($name);
		$this->setLeague($league);
		$this->setUpdate($update);
		$this->setAwayCoolness($away_coolness);
		$this->setAwayFlags($away_flags);
		$this->setAwayCountry($away_country);
		$this->setHomeCoolness($home_coolness);
		$this->setHomeFlags($home_flags);
		$this->setHomeCountry($home_country);
		$this->setAndCoolness($and_coolness);
		$this->setAndFlags($and_flags);
		$this->setAndCountry($and_country);
		$this->setOrCoolness($or_coolness);
		$this->setOrFlags($or_flags);
		$this->setOrCountry($or_country);
		$this->setPlusCoolness($plus_coolness);
		$this->setPlusFlags($plus_flags);
		$this->setPlusCountry($plus_country);
		$this->setUserID($userID);
		$this->setUserName($username);
		$this->setActivationDate($activationDate);
		$this->setFlags($flags);
		$this->setAlliances($alliances);
	}
	
	public function getTeamID() {
		return $this->teamID;
	}
	
	public function setTeamID($teamID) {
		$this->teamID = $teamID;
	}
	
	public function getName() {
		return $this->name;
	}
	
	public function setName($name) {
		$this->name = $name;
	}
	
	public function getLeague() {
		return $this->league;
	}
	
	public function setLeague($league) {
		$this->league = $league;
	}
	
	public function getUpdate() {
		return $this->update;
	}
	
	public function setUpdate($update) {
		$this->update = $update;
	}
	
	public function getAwayCoolness() {
		return $this->away_coolness;
	}
	
	public function setAwayCoolness($coolness) {
		if ($coolness === null) {
			$this->away_coolness = 0;
		}
		else $this->away_coolness = $coolness;
	}
	
	public function getAwayFlags() {
		return $this->away_flags;
	}
	
	public function setAwayFlags($flags) {
		if ($flags === null) {
			$this->away_flags = 0;
		}
		else $this->away_flags = $flags;
	}
	
	public function getAwayCountry() {
		return $this->away_country;
	}
	
	public function setAwayCountry($country) {
		$this->away_country = $country;
	}
	
	public function getHomeCoolness() {
		return $this->home_coolness;
	}
	
	public function setHomeCoolness($coolness) {
		if ($coolness === null) {
			$this->home_coolness = 0;
		}
		else $this->home_coolness = $coolness;
	}
	
	public function getHomeFlags() {
		return $this->home_flags;
	}
	
	public function setHomeFlags($flags) {
		if ($flags === null) {
			$this->home_flags = 0;
		}
		else $this->home_flags = $flags;
	}
	
	public function getHomeCountry() {
		return $this->home_country;
	}
	
	public function setHomeCountry($country) {
		$this->home_country = $country;
	}
	
	public function getAndCoolness() {
		return $this->and_coolness;
	}
	
	public function setAndCoolness($coolness) {
		if ($coolness === null) {
			$this->and_coolness = 0;
		}
		else $this->and_coolness = $coolness;
	}
	
	public function getAndFlags() {
		return $this->and_flags;
	}
	
	public function setAndFlags($flags) {
		if ($flags === null) {
			$this->and_flags = 0;
		}
		else $this->and_flags = $flags;
	}
	
	public function getAndCountry() {
		return $this->and_country;
	}
	
	public function setAndCountry($country) {
		$this->and_country = $country;
	}
	
	public function getOrCoolness() {
		return $this->or_coolness;
	}
	
	public function setOrCoolness($coolness) {
		if ($coolness === null) {
			$this->or_coolness = 0;
		}
		else $this->or_coolness = $coolness;
	}
	
	public function getOrFlags() {
		return $this->or_flags;
	}
	
	public function setOrFlags($flags) {
		if ($flags === null) {
			$this->or_flags = 0;
		}
		else $this->or_flags = $flags;
	}
	
	public function getOrCountry() {
		return $this->or_country;
	}
	
	public function setOrCountry($country) {
		$this->or_country = $country;
	}
	
	public function getPlusCoolness() {
		return $this->plus_coolness;
	}
	
	public function setPlusCoolness($coolness) {
		if ($coolness === null) {
			$this->plus_coolness = 0;
		}
		else $this->plus_coolness = $coolness;
	}
	
	public function getPlusFlags() {
		return $this->plus_flags;
	}
	
	public function setPlusFlags($flags) {
		if ($flags === null) {
			$this->plus_flags = 0;
		}
		else $this->plus_flags = $flags;
	}
	
	public function getPlusCountry() {
		return $this->plus_country;
	}
	
	public function setPlusCountry($country) {
		$this->plus_country = $country;
	}
	
	public function getUserID() {
		return $this->userID;
	}
	
	public function setUserID($userID) {
		$this->userID = $userID;
	}
	
	public function getUserName() {
		return $this->username;
	}
	
	public function setUserName($username) {
		$this->username = $username;
	}
	
	public function getActivationDate() {
		return $this->activationDate;
	}
	
	public function setActivationDate($date) {
		$this->activationDate = $date;
	}
	
	public function getFlags() {
		return $this->flags;
	}
	
	public function setFlags($flags) {
		$this->flags = $flags;
	}
	
	public function getAlliances() {
		return $this->alliances;
	}
	
	public function setAlliances($alliances) {
		$this->alliances = $alliances;
	}
	
	public function addAlliance($alliance) {
		$this->alliances[] = $alliance;
	}
	
	public function resetRatings() {
		$this->setAwayCoolness(0);
		$this->setAwayFlags(0);
		$this->setAwayCountry(null);
		$this->setHomeCoolness(0);
		$this->setHomeFlags(0);
		$this->setHomeCountry(null);
		$this->setAndCoolness(0);
		$this->setAndFlags(0);
		$this->setAndCountry(null);
		$this->setOrCoolness(0);
		$this->setOrFlags(0);
		$this->setOrCountry(null);
		$this->setPlusCoolness(0);
		$this->setPlusFlags(0);
		$this->setPlusCountry(null);
		$this->setFlags(array());
	}
	
}	

?>